/**
 * Created by yanghaijin on 2018/5/16.
 */
module.exports.beforeStartup = function (app, cb) {
    // do some operations before application start up
    console.log("psz beforeStartup");
    cb();
};

module.exports.afterStartup = function (app, cb) {
    // do some operations after application start up
    console.log("psz afterStartup");
    cb();

};

module.exports.beforeShutdown = function (app, cb) {
    // do some operations before application shutdown down
    console.log("psz beforeShutdown");
    cb();
};

module.exports.afterStartAll = function (app) {
    // do some operations after all applications start up
    // var DB_URL = "mongodb://localhost:27017/chm";
    // var DB_NAME = "chess";

    // var mongo = require("./../../util/MongoDBUtil");
    // mongo.connectMongoDB(DB_URL, DB_NAME);
    app.id2Room = {}; // 房间ID对应的房间对象
    // app.id2Room = {};
    console.log("psz afterStartAll");
};